package com.sanerzone.smscenter.biz.DataAccessCachImpl;

import com.sanerzone.smscenter.biz.cache.*;
import com.sanerzone.smscenter.biz.entity.*;
import com.sanerzone.smscenter.biz.iface.DataAccess.DataAccess;

import java.util.List;

public class DataAccessCachImpl implements DataAccess{

//    @Override
//    public List<SmsBlackList> getAllBlackList() {
//        return SysBlacklistHelper.getAll();
//    }

    @Override
    public StringBuffer getUserIdBySign(String sign) {
        return  UserSignCachHelper.get( sign );
    }

    @Override
    public String getAllowedOprator(String key) {
        return AccountCacheHelper.getStringValue(key, "allowedOprator", "");
    }

    @Override
    public SmsTemplate getTemplateById(String templateId) {
        return TemplateCacheHelper.get( templateId );
    }

    @Override
    public List<TemplateRoute> getGroupTemplateRoutes(String groupId) {
        return TemplateRouteCachHelper.get( groupId );
    }

    @Override
    public List<SmsGatewayGroupRel> getGatewayRelByGroup(String groupId) {
        return GatewayRelHelper2.get( groupId );
    }

    @Override
    public List<SmsGatewayGroupRel> getGatewayRelListByTypeAndPid(String groupId, String phoneType, String pid) {
        return GatewayRelHelper2.getListByTypeAndPid( groupId,phoneType,pid );
    }
}
